package domain;

import java.util.LinkedList;
import java.util.List;

public class Terminal {

	private IP ip;
	private List<Paquete> consola;
	private List<String> log;

	public Terminal(IP ip) {
		this.ip = ip;
		this.log = new LinkedList<String>();
	}

	public void recibirPaquete(Paquete unPaquete) {
		this.getConsola().add(unPaquete);
		System.out.println(unPaquete);
	}

	public void escribirEnLog(String accion) {
		this.getLog().add(accion);
	}

	// setters & getters
	public List<Paquete> getConsola() {
		return consola;
	}

	public void setConsola(List<Paquete> consola) {
		this.consola = consola;
	}

	public IP getIp() {
		return ip;
	}

	public void setIp(IP ip) {
		this.ip = ip;
	}

	public List<String> getLog() {
		return log;
	}

	public void setLog(List<String> log) {
		this.log = log;
	}

}
